using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;

namespace Yozeev.BusinessLogic
{
    /// <summary>
    /// 闸机记录
    /// </summary>
    public class GateRecord: ByBranchEntity<Guid>
    {
        /// <summary>
        /// 设备编码
        /// </summary>
        [Required(ErrorMessage = "设备编码不能为空")]
        [StringLength(50)]
        public Guid DeviceId { get; set; }
        [ForeignKey("DeviceId")]
        public virtual Device Device { get; set; }
        /// <summary>
        /// 访问类型
        /// </summary>
        [Required(ErrorMessage = "访问类型不能为空")]
        public VerifiableTypeEnum VerifiableType { get; set; }
        /// <summary>
        /// 访问值
        /// </summary>
        [Required(ErrorMessage = "访问值不能为空")]
        public string VerifiableValue { get; set; }
        /// <summary>
        /// 返回状态
        /// </summary>
        [Required(ErrorMessage = "返回状态不能为空")]
        public ReturnStateEnum ReturnState { get; set; }
        /// <summary>
        /// 返回信息
        /// </summary>
        [Required(ErrorMessage = "返回信息不能为空")]
        public string ReturnInfo { get; set; }

    }
}
